CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 10 Sep 2008 10:16:26 +0000 (11:16 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 10 Sep 2008 10:16:26 +0000 (11:16 +0100)
commit789dc790f316debd10fd808a4f13e08c60930d1a
tree7e4488dc55275697df6ad9ecadfa5309536f990e
parente862b83e8433d8b898b09079dacbffb3bd42af9f
CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast

LAPIC will stop during C3, and resume to work after exit from
C3. Considering below case:
The LAPIC timer was programmed to expire after 1000us, but CPU enter
C3 after 100us and exit C3 at 9xxus.

   0us: reprogram_timer(1000us)
 100us: entry C3, LAPIC timer stop
 9xxus: exit C3 due to unexpected event, LAPIC timer continue running
10xxus: reprogram_timer(1000us), fail due to the past expiring time.
......: no timer softirq raised, no change to LAPIC timer.
......: if entry C3 again, HPET will be forced reprogramed to
 now+small_slop.
......: if entry C2, no change to LAPIC.
18xxus: LAPIC timer expires unexpectedly if no C3 entries after
 10xxus.

Signed-off-by: Wei Gang <gang.wei@intel.com>
xen/arch/x86/hpet.c